﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CodeIn.Core.Modules;
using CodeIn.Ui;

namespace CodeIn.Modules.Misc.SystemInfo {
	public class SystemInfo : BaseModule {
		protected override void InitializeOverride() {
		}

		protected override bool CanExecuteOverride(string[] args) {
			return true;
		}

		protected override void ExecuteOverride(string[] args) {
			var vm = new SystemInfoViewModel();

			var panel = UiHelper.CreateAndShowPanel("System informations", PanelSide.BOTTOMLEFT, () => {
				var view = new SystemInfoView();
				view.DataContext = vm;
				return view;
			});

			panel.CloseRequested += (s, e) => {
				vm.IsEnabled = false;
			};
		}
	}
}
